Name | Description | |
---|---|---|
NPromise<TResult> Constructor | Default constructor |
The following tables list the members exposed by NPromise<TResult>.
Name | Description | |
---|---|---|
NPromise<TResult> Constructor | Default constructor |
Name | Description | |
---|---|---|
Exception | Gets the promise exception. Valid only if the the promise is rejected. | |
IsFulfilled | Gets whether the promise has been fulfilled (succeeded). | |
IsPending | Gets whether the promise is pending (has not been resolved yet). | |
IsRejected | Gets whether the promise has been rejected (failed). | |
IsResolved | Gets whether the promise has been resolved (was fulfilled or rejected). | |
Result | Gets the promise result. Valid only if the promise is fulfilled. | |
State | Gets the promise state |
Name | Description | |
---|---|---|
CastArray | Creates a promise that casts the objects array result of the specified promise, to an array of TResult objects type. | |
CastObject | Creates a promise that casts the object result of the specified promise, to the TResult type. | |
Catch | Adds a rejected handler for this promise. | |
CatchPromiseUndefined | Adds a rejected handler for this promise and returns an undefined promise | |
Create | Creates a safe promise with the specified body | |
CreateFulfilled | Creates a fulfilled promise with the given result. | |
CreateRejected | Creates a rejected promise with the given exception. | |
Finally | Adds a handler which is executed when the promise is either fulfilled or rejected | |
FinallyPromiseUndefined | Adds a handler which is executed when the promise is either fulfilled or rejected | |
Fulfill | Overloaded. Fulfills the promise with specified result. Automatically decides whether to call the promise handlers immediately or asyncrhonously. | |
GetException | Gets the promise exception, if it is rejected. | |
GetResult | Gets the promise result, if it is fullfilled. | |
Reject | Overloaded. Rejects the promise with the specified exception. | |
Then | Overloaded. Adds a succeeded handler for this promise | |
ThenPromise | Overloaded. Adds succeeded and failed handlers for this promise and returns a new promise, which is fulfilled when this promise is fulfilled. | |
ThenPromiseUndefined | Overloaded. Adds succeeded and failed handlers for this promise and returns a new promise, which is fulfilled when this promise is fulfilled. |